package com.snail.cloud.servie;

import com.snail.cloud.entities.Pay;
import com.snail.cloud.entities.PayDTO;

import java.util.List;

/**
 * 支付服务
 *
 * @author snail
 * @date 2024/9/20
 */

public interface PayService {
    /**
     * 添加支付订单
     *
     * @param pay 支付
     * @return int
     * @author Snail
     * @date 2024/09/20
     */
    int add(Pay pay);

    /**
     * 删除支付订单
     *
     * @param id ID主键
     * @return int
     * @author Snail
     * @date 2024/09/20
     */
    int delete(Integer id);

    /**
     * 更新支付订单
     *
     * @param payDTO 支付dto
     * @return int
     * @author Snail
     * @date 2024/09/20
     */
    int update(PayDTO payDTO);

    /**
     * 获取订单，根据 Id
     *
     * @param id ID
     * @return {@link Pay }
     * @author Snail
     * @date 2024/09/20
     */
    Pay get(Integer id);

    /**
     * 获取所有订单
     *
     * @return {@link List }<{@link Pay }>
     * @author Snail
     * @date 2024/09/20
     */
    List<Pay> getAll();
}
